/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.persistencia.domain;

import java.io.Serializable;
import javax.persistence.*;
import javax.validation.constraints.NotNull;

/**
 *
 * @author kenny
 */
@Entity
@Table(name = "dia")
@NamedQueries({
    @NamedQuery(name = "Dia.findAll", query = "SELECT d FROM Dia d"),
    @NamedQuery(name = "Dia.findByNDiaId", query = "SELECT d FROM Dia d WHERE d.nDiaId = :nDiaId")})
public class Dia implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "nDiaId")
    private Integer nDiaId;

    public Dia() {
    }

    public Dia(Integer nDiaId) {
        this.nDiaId = nDiaId;
    }

    public Integer getNDiaId() {
        return nDiaId;
    }

    public void setNDiaId(Integer nDiaId) {
        this.nDiaId = nDiaId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (nDiaId != null ? nDiaId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Dia)) {
            return false;
        }
        Dia other = (Dia) object;
        if ((this.nDiaId == null && other.nDiaId != null) || (this.nDiaId != null && !this.nDiaId.equals(other.nDiaId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.persistencia.domain.Dia[ nDiaId=" + nDiaId + " ]";
    }
    
}
